

using System;
using System.Runtime.InteropServices;

namespace CUtil.Win32
{
	/// <summary> 
	/// 
	/// </summary>
	[System.Security.SuppressUnmanagedCodeSecurity()]
	public class User32 {

		/// <summary> 
		/// Do not create instances of this class!
		/// </summary>
		private User32(){}

#region enums		
		[Flags]
		/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
		public enum AnimateCommands
		{
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_HOR_POSITIVE         =    0x00000001,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_HOR_NEGATIVE         =    0x00000002,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_VER_POSITIVE         =    0x00000004,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_VER_NEGATIVE         =    0x00000008,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_CENTER               =    0x00000010,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_HIDE                 =    0x00010000,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_ACTIVATE             =    0x00020000,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_SLIDE                =    0x00040000,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_8e5z.htm">see Platform SDK</A></summary>
			AW_BLEND                =    0x00080000
		}
		/// <summary>WM_ACTIVATE flags</summary>
		public enum ActivateFlags 
		{
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_3exx.htm">see Platform SDK</A></summary>
			WA_INCATIVE = 0,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_3exx.htm">see Platform SDK</A></summary>
			WA_ACTIVE = 1,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_3exx.htm">see Platform SDK</A></summary>
			WA_CLICKACTIVE = 2
		}
		/// <summary>Set Window Position flags</summary>
		[Flags]
		public enum PositionFlags
		{
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOSIZE         = 0x0001,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOMOVE         = 0x0002,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOZORDER       = 0x0004,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOREDRAW       = 0x0008,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOACTIVATE     = 0x0010,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_FRAMECHANGED   = 0x0020, 
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_SHOWWINDOW     = 0x0040,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_HIDEWINDOW     = 0x0080,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOCOPYBITS     = 0x0100,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOOWNERZORDER  = 0x0200,  
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_NOSENDCHANGING = 0x0400, 
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_DEFERERASE     = 0x2000,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_2blf.htm">see Platform SDK</A></summary>
			SWP_ASYNCWINDOWPOS = 0x4000
		}

		/// <summary>Item state DRAWITEMSTRUCT</summary>
		[Flags]
		public enum DrawItemStates {
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_SELECTED	= 0x0001,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_GRAYED		= 0x0002,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_DISABLED   	= 0x0004,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_CHECKED    	= 0x0008,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_FOCUS      	= 0x0010,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_DEFAULT    	= 0x0020,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_HOTLIGHT   	= 0x0040,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_INACTIVE   	= 0x0080,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_NOACCEL    	= 0x0100,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODS_NOFOCUSRECT	= 0x0200
		}

		/// <summary>Item type DRAWITEMSTRUCT</summary>
		public enum DrawItemTypes {
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODT_HEADER      = 100,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODT_TAB         = 101,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODT_LISTVIEW	= 102,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODT_MENU		= 1,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODT_LISTBOX		= 2,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODT_COMBOBOX	= 3,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_3sx9.htm">see Platform SDK</A></summary>
			ODT_BUTTON		= 4
		}

		/// <summary>Hittest codes</summary>
		public enum HitTestCodes {
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/mousinpt_7ik4.htm">see Platform SDK</A></summary>
			HTCAPTION = 0x2
		}

		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_1u44.htm">see Platform SDK</A>
		/// </summary>
		[Flags]
		public enum KeyboardLayoutFlags
		{
			/// <summary></summary>
			KLF_ACTIVATE		= 0x1,
			/// <summary></summary>
			KLF_SUBSTITUTE_OK	= 0x2,
			/// <summary></summary>
			KLF_UNLOADPREVIOUS	= 0x4,
			/// <summary></summary>
			KLF_REORDER			= 0x8,
		}

		/// <summary>..</summary>
		public enum MenuFlags
		{
			/// <summary>..</summary>
			MF_INSERT           = 0x0000,
			/// <summary>..</summary>
			MF_CHANGE           = 0x0080,
			/// <summary>..</summary>
			MF_APPEND           = 0x0100,
			/// <summary>..</summary>
			MF_DELETE           = 0x0200,
			/// <summary>..</summary>
			MF_REMOVE           = 0x1000,

			/// <summary>..</summary>
			MF_BYCOMMAND        = 0x0000,
			/// <summary>..</summary>
			MF_BYPOSITION       = 0x0400,

			/// <summary>..</summary>
			MF_SEPARATOR        = 0x0800,

			/// <summary>..</summary>
			MF_ENABLED          = 0x0000,
			/// <summary>..</summary>
			MF_GRAYED           = 0x0001,
			/// <summary>..</summary>
			MF_DISABLED         = 0x0002,

			/// <summary>..</summary>
			MF_UNCHECKED        = 0x0000,
			/// <summary>..</summary>
			MF_CHECKED          = 0x0008,
			/// <summary>..</summary>
			MF_USECHECKBITMAPS  = 0x0200,

			/// <summary>..</summary>
			MF_STRING           = 0x0000,
			/// <summary>..</summary>
			MF_BITMAP           = 0x0004,
			/// <summary>..</summary>
			MF_OWNERDRAW        = 0x0100,

			/// <summary>..</summary>
			MF_POPUP            = 0x0010,
			/// <summary>..</summary>
			MF_MENUBARBREAK     = 0x0020,
			/// <summary>..</summary>
			MF_MENUBREAK        = 0x0040,

			/// <summary>..</summary>
			MF_UNHILITE         = 0x0000,
			/// <summary>..</summary>
			MF_HILITE           = 0x0080,

			/// <summary>..</summary>
			MF_DEFAULT          = 0x1000,
			/// <summary>..</summary>
			MF_SYSMENU          = 0x2000,
			/// <summary>..</summary>
			MF_HELP             = 0x4000,
			/// <summary>..</summary>
			MF_RIGHTJUSTIFY     = 0x4000,

			/// <summary>..</summary>
			MFT_STRING          =MF_STRING,
			/// <summary>..</summary>
			MFT_BITMAP          =MF_BITMAP,
			/// <summary>..</summary>
			MFT_MENUBARBREAK    =MF_MENUBARBREAK,
			/// <summary>..</summary>
			MFT_MENUBREAK       =MF_MENUBREAK,
			/// <summary>..</summary>
			MFT_OWNERDRAW       =MF_OWNERDRAW,
			/// <summary>..</summary>
			MFT_RADIOCHECK      = 0x0200,
			/// <summary>..</summary>
			MFT_SEPARATOR       =MF_SEPARATOR,
			/// <summary>..</summary>
			MFT_RIGHTORDER      = 0x2000,
			/// <summary>..</summary>
			MFT_RIGHTJUSTIFY    =MF_RIGHTJUSTIFY,

			/// <summary>..</summary>
			MFS_GRAYED          = 0x0003,
			/// <summary>..</summary>
			MFS_DISABLED        =MFS_GRAYED,
			/// <summary>..</summary>
			MFS_CHECKED         =MF_CHECKED,
			/// <summary>..</summary>
			MFS_HILITE          =MF_HILITE,
			/// <summary>..</summary>
			MFS_ENABLED         =MF_ENABLED,
			/// <summary>..</summary>
			MFS_UNCHECKED       =MF_UNCHECKED,
			/// <summary>..</summary>
			MFS_UNHILITE        =MF_UNHILITE,
			/// <summary>..</summary>
			MFS_DEFAULT         =MF_DEFAULT,

			/// <summary>..</summary>
			MIIM_STATE       = 0x0001,	
			/// <summary>..</summary>
			MIIM_ID          = 0x0002,
			/// <summary>..</summary>
			MIIM_SUBMENU     = 0x0004,
			/// <summary>..</summary>
			MIIM_CHECKMARKS  = 0x0008,
			/// <summary>..</summary>
			MIIM_TYPE        = 0x0010,
			/// <summary>..</summary>
			MIIM_DATA        = 0x0020,
			/// <summary>..</summary>
			MIIM_STRING      = 0x0040,
			/// <summary>..</summary>
			MIIM_BITMAP      = 0x0080,
			/// <summary>..</summary>
			MIIM_FTYPE       = 0x0100,
		}

		/// <summary></summary>
		[Flags]
		public enum MessageBoxTypes {
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/dlgboxes_76bc.htm">see Platform SDK</A></summary>
			MB_CANCEL		   = -1,		
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/dlgboxes_76bc.htm">see Platform SDK</A></summary>
			MB_OK              = 0,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/dlgboxes_76bc.htm">see Platform SDK</A></summary>
			MB_ICONHAND        = 0x10,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/dlgboxes_76bc.htm">see Platform SDK</A></summary>
			MB_ICONQUESTION    = 0x20,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/dlgboxes_76bc.htm">see Platform SDK</A></summary>
			MB_ICONEXCLAMATION = 0x30,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/dlgboxes_76bc.htm">see Platform SDK</A></summary>
			MB_ICONASTERISK    = 0x40
		}

		/// <summary>Specify the wait behavior for MsgWaitForMultipleObjectsEx</summary>
		[Flags]
		public enum MsgWaitFlags {
			/// <summary>Return if any object signals</summary>
			MWMO_WAITANY        = 0x0000,
			/// <summary>Return if all objects are signaled</summary>
			MWMO_WAITALL        = 0x0001,
			/// <summary>Return if an APC has been queued to the thread with QueueUserAPC</summary>
			MWMO_ALERTABLE      = 0x0002,
			/// <summary>Return if input exists for the queue, even if the input has been seen
			/// (but not removed) using a call to another function, such as PeekMessage.</summary>
			MWMO_INPUTAVAILABLE = 0x0004
		}
		
		/// <summary>Specify the wake behavior for MsgWaitForMultipleObjectsEx</summary>
		[Flags]
		public enum MsgWaitWakeMask {
			/// <summary>A WM_KEYUP, WM_KEYDOWN, WM_SYSKEYUP, or WM_SYSKEYDOWN message is in the queue.</summary>
			QS_KEY              = 0x0001,
			/// <summary>A WM_MOUSEMOVE message is in the queue.</summary>
			QS_MOUSEMOVE        = 0x0002,
			/// <summary>A mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).</summary>
			QS_MOUSEBUTTON      = 0x0004,
			/// <summary>A posted message is in the queue. 
			/// This value is cleared when you call GetMessage or PeekMessage without filtering messages.
			///</summary>
			QS_POSTMESSAGE      = 0x0008,
			/// <summary>A WM_TIMER message is in the queue.</summary>
			QS_TIMER            = 0x0010,
			/// <summary>A WM_PAINT message is in the queue.</summary>
			QS_PAINT            = 0x0020,
			/// <summary>A message sent by another thread or application is in the queue.</summary>
			QS_SENDMESSAGE      = 0x0040,
			/// <summary>A WM_HOTKEY message is in the queue.</summary>
			QS_HOTKEY           = 0x0080,
			/// <summary>A posted message is in the queue. 
			///This value is cleared when you call GetMessage or PeekMessage, whether or not you are filtering messages.
			///</summary>
			QS_ALLPOSTMESSAGE   = 0x0100,
			/// <summary>Windows XP: A raw input message is in the queue. For more information, see Raw Input. </summary>
			QS_RAWINPUT         = 0x0400,
			/// <summary>A WM_MOUSEMOVE message or mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on). 
			///This value is a combination of QS_MOUSEMOVE and QS_MOUSEBUTTON.
			///</summary>
			QS_MOUSE            = ( QS_MOUSEMOVE |
			                        QS_MOUSEBUTTON),
			/// <summary>An input message is in the queue. 
			/// This value is a combination of QS_MOUSE and QS_KEY.
			/// Windows XP: This value also includes QS_RAWINPUT.
			///</summary>
			QS_INPUT            = ( QS_MOUSE | 
			                    	QS_KEY | 
			                    	QS_RAWINPUT),
			/// <summary>An input, WM_TIMER, WM_PAINT, WM_HOTKEY, or posted message is in the queue. 
			/// This value is a combination of QS_INPUT, QS_POSTMESSAGE, QS_TIMER, QS_PAINT, and QS_HOTKEY.
			/// </summary>
			QS_ALLEVENTS        = (QS_INPUT | 
			                    	QS_POSTMESSAGE | 
			                    	QS_TIMER | 
			                    	QS_PAINT | 
			                    	QS_HOTKEY),
			/// <summary>Any message is in the queue. 
			/// This value is a combination of QS_INPUT, QS_POSTMESSAGE, QS_TIMER, QS_PAINT, QS_HOTKEY, and QS_SENDMESSAGE.
			/// </summary>
			QS_ALLINPUT         = (QS_INPUT | 
			                    	QS_POSTMESSAGE | 
			                    	QS_TIMER | 
			                    	QS_PAINT | 
			                    	QS_HOTKEY | 
			                    	QS_SENDMESSAGE),
		}
		
		/// <summary>Drawing options for WM_PRINT</summary>
		public enum PrintOptions {
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/pantdraw_3qwk.htm">see Platform SDK</A></summary>
			PRF_CHECKVISIBLE  = 0x001,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/pantdraw_3qwk.htm">see Platform SDK</A></summary>
			PRF_NONCLIENT     = 0x002,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/pantdraw_3qwk.htm">see Platform SDK</A></summary>
			PRF_CLIENT        = 0x004,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/pantdraw_3qwk.htm">see Platform SDK</A></summary>
			PRF_ERASEBKGND    = 0x008,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/pantdraw_3qwk.htm">see Platform SDK</A></summary>
			PRF_CHILDREN      = 0x010,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/pantdraw_3qwk.htm">see Platform SDK</A></summary>
			PRF_OWNED         = 0x020
		}

		/// <summary>Scroll Bar Commands</summary>
		public enum ScrollbarCommands 
		{
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_LINEUP       =    0,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_LINELEFT     =    0,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_LINEDOWN     =    1,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_LINERIGHT    =    1,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_PAGEUP       =    2,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_PAGELEFT     =    2,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_PAGEDOWN     =    3,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_PAGERIGHT    =    3,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_THUMBPOSITION=    4,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_THUMBTRACK   =    5,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_TOP          =    6,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_LEFT         =    6,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_BOTTOM       =    7,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_RIGHT        =    7,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_90mk.htm">see Platform SDK</A></summary>
			SB_ENDSCROLL    =    8
		}

		/// <summary>Scrollbar messages.</summary>
		public enum ScrollbarMessages {
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/scrolbar_6wj7.htm">see Platform SDK</A></summary>
			SBM_GETSCROLLINFO            =   0x00EA
		}

		/// <summary>ShowWindow commands</summary>
		public enum ShowWindowCommands
		{
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_HIDE            = 0,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOWNORMAL      = 1,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_NORMAL          = 1,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOWMINIMIZED   = 2,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOWMAXIMIZED   = 3,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_MAXIMIZE        = 3,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOWNOACTIVATE  = 4,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOW            = 5,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_MINIMIZE        = 6,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOWMINNOACTIVE = 7,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOWNA          = 8,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_RESTORE         = 9,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_SHOWDEFAULT     = 10,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_FORCEMINIMIZE   = 11,
			/// <summary><A HREF="ms-help://MS.MSDNQTR.2002JAN.1033/winui/windows_2tdj.htm">see Platform SDK</A></summary>
			SW_MAX             = 11
		}					  

		/// <summary>Virtual Keycodes</summary>
		public enum VirtualKeyCodes {
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_LBUTTON 	= 0x01,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_RBUTTON 	= 0x02,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_CANCEL  	= 0x03,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_CONTROL 	= 0x11,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_SPACE    = 0x20,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_PRIOR    = 0x21,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_NEXT     = 0x22,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_END      = 0x23,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_HOME     = 0x24,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_LEFT     = 0x25,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_UP       = 0x26,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_RIGHT    = 0x27,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_DOWN     = 0x28,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_SELECT   = 0x29,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_PRINT    = 0x2A,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_EXECUTE  = 0x2B,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_SNAPSHOT = 0x2C,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_INSERT   = 0x2D,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_DELETE   = 0x2E,
			/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/vkeys_529f.htm">see Platform SDK</A></summary>
			VK_HELP     = 0x2F
		}
		

#endregion enums		

#region constants
		/// <summary></summary>
		public const int WM_USER			 = 0x400;
		/// <summary></summary>
		public const int EM_FORMATRANGE	 = WM_USER+57;
		/// <summary></summary>
		public const int EM_SETTARGETDEVICE = WM_USER+72;

		/// <summary>Infinite timeout</summary>
		public const int INFINITE = -1;

		/// <summary>The maximum path length</summary>
		public const int _MAX_PATH=260;

		/// <summary>Waiting failed</summary>
		public const int WAIT_FAILED   = -1;
		/// <summary>Waiting aborted due to timeout</summary>
		public const int WAIT_TIMEOUT  = 258;
		/// <summary>Waiting aborted because object was signaled</summary>
		public const int WAIT_OBJECT_0 = 0x00000000;
		/// <summary>Waiting aborted because all objects signaled and at least one of them is abandoned</summary>
		public const int WAIT_ABANDONED_0 = 0x00000080;
#endregion constants

#region structs
		/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/combobox_88s2.htm">see Platform SDK</A></summary>
		[StructLayout(LayoutKind.Sequential)]
		public struct DRAWITEMSTRUCT
		{
			/// <summary>
			/// Specifies the control type. This member can be one of the 
			/// values shown in the following table. 
			/// </summary>
			public DrawItemTypes CtlType; 
			/// <summary>
			/// Specifies the identifier of the combo box, list box, button, 
			/// or static control. This member is not used for a menu item.
			/// </summary>
			public Int32 CtlID; 
			/// <summary>
			/// This allows the application to draw only the focus rectangle at the 
			/// coordinates specified by the rcItem member even though there are no 
			/// items in the control. This indicates to the user whether the list 
			/// box or combo box has the focus. How the bits are set in the itemAction 
			/// member determines whether the rectangle is to be drawn as though 
			/// the list box or combo box has the focus. 
			/// </summary>
			public Int32 itemID;
			/// <summary>
			/// Specifies the drawing action required. This member can be one or 
			/// more of the values shown in the following table. 
			/// </summary>
			public Int32 itemAction; 
			/// <summary>
			/// Specifies the visual state of the item after the current drawing 
			/// action takes place. This member can be a combination of the values 
			/// shown in the following table. 
			/// ODS_FOCUS The item has the keyboard focus.
			/// ODS_SELECTED The listView item's status is selected.
			/// </summary>
			public DrawItemStates itemState; 
			/// <summary>
			/// Handle to the control
			/// </summary>
			public IntPtr hwndItem; 
			/// <summary>
			/// Handle to a device context; this device context must be used when performing
			/// drawing operations on the control. 
			/// </summary>
			public IntPtr hDC;						//HDC
			/// <summary>
			/// Specifies a rectangle that defines the boundaries of the control to be drawn. 
			/// This rectangle is in the device context specified by the hDC member. 
			/// The system automatically clips anything that the owner window draws in 
			/// the device context for combo boxes, list boxes, and buttons, but does 
			/// not clip menu items. When drawing menu items, the owner window must not 
			/// draw outside the boundaries of the rectangle defined by the rcItem member. 
			/// </summary>
			[MarshalAs(UnmanagedType.Struct)]public RECT rcItem;
			/// <summary>
			/// The value is initially zero in the case of ListView control
			/// </summary>
			public Int32 itemData;					//ULONG_PTR
		}; 

		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNVS/dnintl/html/S24B5_a1.htm">see Platform SDK, definition of HKL after Table 6-2</A>
		/// </summary>
		[StructLayout(LayoutKind.Sequential)]
		public struct HKL
		{
			/// <summary></summary>
			public short langId;
			/// <summary></summary>
			public short devId;
		}

		/// <summary></summary>
		[ StructLayout( LayoutKind.Sequential )]
			public struct MENUITEMINFO 
		{
			/// <summary></summary>
			public int    cbSize; 
			/// <summary></summary>
			public int    fMask; 
			/// <summary></summary>
			public int    fType; 
			/// <summary></summary>
			public int    fState; 
			/// <summary></summary>
			public int    wID; 
			/// <summary></summary>
			public IntPtr hSubMenu; 
			/// <summary></summary>
			public IntPtr hbmpChecked; 
			/// <summary></summary>
			public IntPtr hbmpUnchecked; 
			/// <summary></summary>
			public IntPtr dwItemData; 
			/// <summary></summary>
			public IntPtr dwTypeData; 
			/// <summary></summary>
			public int    cch; 
			/// <summary></summary>
			public IntPtr hbmpItem;
		} 

		/// <summary></summary>
		[StructLayout(LayoutKind.Sequential)]
		internal struct PAINTSTRUCT
		{
			/// <summary></summary>
			public Int32 hdc;
			/// <summary></summary>
			public Boolean fErase;
			/// <summary></summary>
			public Int32 rcleft;		
			/// <summary></summary>
			public Int32 rctop;		
			/// <summary></summary>
			public Int32 rcright;		
			/// <summary></summary>
			public Int32 rcbottom;	
			/// <summary></summary>
			// [MarshalAs(UnmanagedType.Struct)]public RECT rcPaint;
			public Boolean fRestore;
			/// <summary></summary>
			public Boolean fIncUpdate;
			/// <summary></summary>
			public Int32 res1;
			/// <summary></summary>
			public Int32 res2;
			/// <summary></summary>
			public Int32 res3;
			/// <summary></summary>
			public Int32 res4;
			/// <summary></summary>
			public Int32 res5;
			/// <summary></summary>
			public Int32 res6;
			/// <summary></summary>
			public Int32 res7;
			/// <summary></summary>
			public Int32 res8;
		}

		/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/pantdraw_9ape.htm">see Platform SDK</A></summary>
		[StructLayout(LayoutKind.Sequential)]
		public struct PAINTSTRUCT2
		{
			/// <summary></summary>
			public System.Int32 hdc;
			/// <summary></summary>
			public System.Boolean fErase;
			/// <summary></summary>
			[MarshalAs(UnmanagedType.Struct)]public RECT rcPaint;
			/// <summary></summary>
			public Boolean fRestore;
			/// <summary></summary>
			public Boolean fIncUpdate;
			/// <summary></summary>
			public Int32 res1;
			/// <summary></summary>
			public Int32 res2;
			/// <summary></summary>
			public Int32 res3;
			/// <summary></summary>
			public Int32 res4;
			/// <summary></summary>
			public Int32 res5;
			/// <summary></summary>
			public Int32 res6;
			/// <summary></summary>
			public Int32 res7;
			/// <summary></summary>
			public Int32 res8;
		}

		/// <summary></summary>
		[StructLayout(LayoutKind.Sequential)]
			public struct POINT 
		{ 
			/// <summary></summary>
			public int x; 
			/// <summary></summary>
			public int y; 
		}

		/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/gdi/rectangl_6cqa.htm">see Platform SDK</A></summary>
		[StructLayout(LayoutKind.Sequential)]
		public  struct RECT
		{
			/// <summary>left</summary>
			public Int32 left;		
			/// <summary></summary>
			public Int32 top;		
			/// <summary></summary>
			public Int32 right;		
			/// <summary></summary>
			public Int32 bottom;		
		}
		/// <summary>
		/// 
		/// </summary>
		[ StructLayout( LayoutKind.Sequential )]
		public struct CHARRANGE 
		{
			/// <summary></summary>
			public int cpMin;
			/// <summary></summary>
			public int cpMax;
		}
		/// <summary>
		/// 
		/// </summary>
		[ StructLayout( LayoutKind.Sequential )]
		public struct FORMATRANGE 
		{
			/// <summary></summary>
			public IntPtr hdc; 
			/// <summary> </summary>
			public IntPtr hdcTarget; 
			/// <summary></summary>
			public RECT rc; 
			/// <summary></summary>
			public RECT rcPage; 
			/// <summary></summary>
			public CHARRANGE chrg; 
		}

#endregion structs

#region functions
		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/windows_0f5g.htm">see Platform SDK</A>
		/// </summary>
		[DllImport("user32", SetLastError=true)]
		public static extern int GetClientRect(IntPtr hWnd,	ref RECT lpRect);

		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_0alw.htm">see Platform SDK</A>
		/// </summary>
		[DllImport("user32", CharSet=CharSet.Ansi)]
		public static extern HKL ActivateKeyboardLayout(HKL hkl, KeyboardLayoutFlags flags); 

		/// <summary></summary>	
		[DllImport("user32")]
		public static extern bool AnimateWindow(IntPtr hWnd, int dwTime, int dwFlags); 

		/// <summary><A HREF="ms-help://MS.VSCC/MS.MSDNVS/debug/errors_31rk.htm">see Platform SDK</A></summary>
		//[DllImport("user32.dll")]
		[DllImport("user32.dll", EntryPoint="MessageBeep")]
		public static extern bool Beep (MessageBoxTypes tones);

		/// <summary></summary>
		[DllImport("user32")]
		public static extern IntPtr BeginPaint(IntPtr hwnd, [MarshalAs(UnmanagedType.Struct)] ref PAINTSTRUCT2 ps);

		/// <summary></summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern IntPtr CreatePopupMenu();

		/// <summary></summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern int DestroyMenu( IntPtr hMenu );

		/// <summary></summary>
		[DllImport("user32")]
		public static extern IntPtr EndPaint(IntPtr hwnd, [MarshalAs(UnmanagedType.Struct)] ref PAINTSTRUCT2 ps);

		/// <summary></summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern int GetAsyncKeyState( int vKey );

		/// <summary></summary>	
		[DllImport("user32")]
		public static extern System.IntPtr GetCapture(); 

		/// <summary></summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern int GetCursorPos( out POINT lPoint );

		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNQTR.2002JAN.1033/winui/windows_6uuv.htm">see Platform SDK</A>
		/// </summary>
		[DllImport("user32.dll")]
		public static extern System.IntPtr GetDesktopWindow();

		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_33qs.htm">see Platform SDK</A>
		/// </summary>
		[DllImport("user32", CharSet=CharSet.Ansi)]
		public static extern short GetKeyboardLayoutList(short nBuff, [In, Out] HKL[] hkl); 

		/// <summary></summary>
		[DllImport("user32")]
		public static extern short GetKeyState (VirtualKeyCodes nVirtKey);

		/// <summary>GetProp call.</summary>
		/// <remarks>The lpString parameter might be an atom or a string</remarks>
		[DllImport("user32.dll")]
		public static extern System.IntPtr GetProp(IntPtr hWnd,	string lpString);

		/// <summary></summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern int InsertMenuItem(IntPtr hMenu, int uItem, int fByPosition, IntPtr lpmii);

		/// <summary>
		/// LockWindowUpdate call. The parameter is Handle to window
		/// If parameter is Empty IntPrt unLock the window.			
		/// </summary>
		[DllImport("user32.dll")]
		public static extern bool LockWindowUpdate(IntPtr hWnd);			

		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_1u44.htm">see Platform SDK</A>
		/// </summary>
		[DllImport("user32", CharSet=CharSet.Ansi)]
		public static extern HKL LoadKeyboardLayout(string pwszKLID, KeyboardLayoutFlags flags); 

		/// <summary></summary>
		[DllImport("User32.dll")]
		public static extern int MsgWaitForMultipleObjects(int handleCount, IntPtr handles, bool fWaitAll, int timeout, MsgWaitWakeMask waitMask);

		/// <summary></summary>
		[DllImport("user32")]
		public static extern int PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); 

		/// <summary></summary>
		[DllImport("user32")]
		public static extern int RegisterWindowMessage(string message);

		/// <summary></summary>
		[DllImport("user32")]
		public static extern void ReleaseDC(IntPtr hwnd, IntPtr hdc);

		/// <summary>RemoveProp call.</summary>
		/// <remarks>The lpString parameter might be an atom or a string</remarks>
		[DllImport("user32.dll")]
		public static extern System.IntPtr RemoveProp(IntPtr hWnd, string lpString);

		/// <summary>
		/// 
		/// </summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref CommCtrl.TVITEM lParam);

		/// <summary>SendMessage call.</summary>
		[DllImport("user32")]
		public static extern int SendMessage(IntPtr hWnd, WindowsMessages msg, IntPtr wParam, IntPtr lParam);

		/// <summary>SendMessage call.</summary>
		[DllImport("user32")]
		public static extern bool SendMessage(IntPtr hWnd, WindowsMessages msg, uint wParam, IntPtr lParam);

		/// <summary>
		/// Send Window message override to send strings
		/// </summary>
		[DllImport("User32.dll", CharSet=CharSet.Auto)]			
		public static extern IntPtr SendMessage(IntPtr hWnd, WindowsMessages msg, IntPtr wParam, string lParam);

		/// <summary>SendMessage overrride for direct integer values</summary>
		[DllImport("user32")]
		public static extern int SendMessage(IntPtr hWnd, WindowsMessages msg, int wParam, int lParam);

		/// <summary></summary>	
		[DllImport("user32")]
		public static extern System.IntPtr SetCapture(System.IntPtr hWnd); 

		/// <summary>SetProp call.</summary>
		/// <remarks>The lpString parameter might be an atom or a string</remarks>
		[DllImport("user32.dll")]
		public static extern int SetProp(IntPtr hWnd, string lpString, IntPtr hData);

		/// <summary> </summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);

		/// <summary>SetParent call.</summary>
		/// <remarks>The SetParent function changes the parent window of the specified child window. 
		/// An application can use the SetParent function to set the parent window of a pop-up, overlapped, or child window. The new parent window and the child window must belong to the same application. 
		/// If the window identified by the hWndChild parameter is visible, the system performs the appropriate redrawing and repainting. 
		/// For compatibility reasons, SetParent does not modify the WS_CHILD or WS_POPUP window styles of the window whose parent is being changed. Therefore, if hWndNewParent is NULL, you should also 
		/// clear the WS_CHILD bit and set the WS_POPUP style after calling SetParent. Conversely, if hWndNewParent is not NULL and the window was previously a child of the desktop, you should 
		/// clear the WS_POPUP style and set the WS_CHILD style before calling SetParent. </remarks>																																																																																																														  </remarks>
		[DllImport("user32.dll")]
		public static extern int SetParent(IntPtr hWndChild, IntPtr hWndParent);

		/// <summary></summary>
		[DllImport("user32")]
		public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int flags); 

		/// <summary></summary>
		[DllImport("user32")]
		public  static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow); 

		/// <summary></summary>
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static extern int TrackPopupMenu( IntPtr hMenu, int uFlags, int x, int y, int nReserved,	IntPtr hWnd, IntPtr prcRect	);

		/// <summary>
		/// <A HREF="ms-help://MS.VSCC/MS.MSDNVS/winui/keybinpt_17zo.htm">see Platform SDK</A>
		/// </summary>
		[DllImport("user32", CharSet=CharSet.Ansi)]
		public static extern bool UnloadKeyboardLayout(HKL hkl); 
 
#endregion functions
	}
}

